<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script> 
<script>
function message_submit(){
	var allaa=$("input[name=all]:checked").val();
	if(!allaa){
		parent.layer.msg('请选择发送信息的用户！', 2, 8);return false;
	}
	if(allaa=="5"){
		if($("#userarr").val()==""){
			parent.layer.msg('请输入用户名！', 2, 8);return false;
		}
	}
	var content=$("#content").val();
	if(content==''){parent.layer.msg('信息内容不能为空！', 2, 8);return false;}
	loadlayer();
}
</script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet"/>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp"> 
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">发送系统消息，根据需要选择收取信息的用户。</div>
</div>
</div>
<div class="clear"></div>
 <div class="tag_box mt10">
<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe> 
<form name="myform" target="supportiframe" action="index.php?m=sysnews&c=add" 
  method="post" onSubmit="return message_submit();" class="layui-form">
	<table width="100%" class="table_form">
     <tr>
              <td colspan="2" bgcolor="#f0f6fb"><div class="admin_bold">发送系统信息</div></td>
            </tr>
    <tr class="admin_table_trbg">
      <th width="120">选择用户</th>
      <td>
        <div class="layui-form-item">
          <div class="layui-input-block">
            <input name="all" value="1" title="个人用户" type="radio" lay-filter="all">
            <input name="all" value="2" title="企业用户" type="radio" lay-filter="all">
            <input name="all" value="3" title="猎头用户" type="radio" lay-filter="all">
            <input name="all" value="4" title="培训用户" type="radio" lay-filter="all">
            <input name="all" value="5" title="自定义用户" type="radio" lay-filter="all">
          </div>
        </div>
      </td>
    </tr>
        <tr id="user_email" style="display:none;">
			<th>用户名：</th>
			<td><input class="input-text" type="text" id="userarr" name="userarr" size="40" value=""/><span class="admin_web_tip">多个用户请用,(半角)隔开</span></td>
		</tr>
        <tr>
			<th width="120">信息内容</th>
			<td>
           <textarea  id="content" name="content" cols="100" rows="8"  class="web_text_textarea"></textarea>
			</td>
		</tr>
		<tr class="admin_table_trbg">
			<th>&nbsp;</th>
			<td align="left" >
            <input class="admin_button" type="submit" name="submit" value="&nbsp;发 送&nbsp;"  />
     		<input class="admin_button" type="reset" name="reset" value="&nbsp;重 置 &nbsp;" />
            </td>
		</tr>
	</table>
	<input type="hidden" name="pytoken" id="pytoken" value="{yun:}$pytoken{/yun}">
</form>
</div>
<script type="text/javascript">
  layui.use(['form'],function(){
    var form = layui.form
      ,$ = layui.$;

    form.on('radio(all)', function(data){
      if(data.value == 5){
        $("#user_email").show();
      }else{
        $("#user_email").hide();
        $("input[name=userarr]").val(''); 
      }
    });
  });
</script>
</body>
</html>